Skip to main content

Interface IUnit<TSelf, TUnit>

Defines a standardized interface for unit value types that represent physical quantities.

Assembly: Meadow.Units.dll
View Source
Declaration
public interface IUnit<TSelf, TUnit> where TSelf : struct, IUnit<TSelf, TUnit> where TUnit : struct, Enum

Methods

ToCanonical()

Converts the current unit value to its canonical unit representation.

View Source
Declaration
double ToCanonical()
Returns

System.Double: The value expressed in the canonical unit### GetCanonicalUnitType() Gets the enum value that represents the canonical unit of measurement for this type.

View Source
Declaration
TUnit GetCanonicalUnitType()
Returns

<TUnit>: The canonical unit type